package com.hskn.hss.module.alarmsheshi.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * <p>
 *
 * </p>
 *
 * @author hskn
 * @since 2021-05-21
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class AlarmSheshi implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "alarm_sheshi_id", type = IdType.ASSIGN_UUID)
    private String alarmSheshiId;

    private String sheshiId;

    private String sheshiName;

    @TableField(exist = false)
    private String expType;
    /**
     * 设施ID集合
     */
    @TableField(exist = false)
    private List<String> sheshiIds;
    /**
     * 部门ID集合
     */
    @TableField(exist = false)
    private List<String> depIds;
    /**
     * ids
     */
    @TableField(exist = false)
    private List<String> ids;

    @TableField(exist = false)
    private String sheshiNameAndAlarmTypeName;
    /**
     * 设施类型大类id
      */
    private String facltypeid;
    /**
     * 设施类型大类名称
      */
    private String facltypename;
    /**
     * 设施类型小类id
      */
    private String facltypeitemid;
    /**
     * 设施类型小类名称
      */
    private String facltypeitemname;

    private String depId;

    private String depName;

    private String alarmTypeId;

    private String alarmTypeName;
    /*
     *气体类型
     */
    private String gasType;

    private String lng;

    private String lat;

    private String address;

    private Date alarmTime;

    //日期
    @TableField(exist = false)
    private String alarmDate;

    private String content;

    private String dealType;

    private String dealRemark;

    private String dealUid;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date alarmStartTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date alarmEndTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(exist = false)
    private Date startDate;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(exist = false)
    private Date endDate;

    private Integer isKeep;
    private BigDecimal alarmValue;

    public AlarmSheshi(String alarmSheshiId, String dealType, String dealRemark, String dealUid) {
        this.alarmSheshiId = alarmSheshiId;
        this.dealType = dealType;
        this.dealRemark = dealRemark;
        this.dealUid = dealUid;
    }

    public AlarmSheshi(String alarmSheshiId, String sheshiId, String sheshiName, String depId, String alarmTypeId, String alarmTypeName, String lng, String lat, String address, Date alarmTime, String content, String dealType) {
        this.alarmSheshiId = alarmSheshiId;
        this.sheshiId = sheshiId;
        this.sheshiName = sheshiName;
        this.depId = depId;
        this.alarmTypeName=alarmTypeName;
        this.lat=lat;
        this.lng=lng;
        this.alarmTypeId = alarmTypeId;
        this.address = address;
        this.alarmTime = alarmTime;
        this.content = content;
        this.dealType = dealType;
    }

    public AlarmSheshi() {
    }
    @TableField(exist = false)
    private String facHeadPortraitAlarm;

    /**
     * 是否已读(0未读  1已读)
     */
    @TableField(exist = false)
    private Integer isRead;

    //日期类型(1按天查询  2按月查询)
    @TableField(exist = false)
    private String dateType;

    /**
     * 页数
     */
    @TableField(exist = false)
    private Integer pageNum;
    /**
     * 条数
     */
    @TableField(exist = false)
    private Integer pageSize;
}
